﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="WebForm1.aspx.cs" Inherits="Cart.WebForm1" %>

<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
</head>
<body>
    <form id="form1" runat="server">
    <div>
    <asp:Repeater runat="server" id="results">
        <ItemTemplate> 
            <asp:Repeater ID="Repeater1" runat="server" datasource='<%# ((Cart.WebForm1.WebPage)Container.DataItem).Links.Select ( link => new {
                                Id = ((Cart.WebForm1.WebPage)Container.DataItem).Id, 
                                Title = ((Cart.WebForm1.WebPage)Container.DataItem).Title, 
                                Url = ((Cart.WebForm1.WebPage)Container.DataItem).Url, 
                                URL = link.URL,
                                URLType = link.URLType,
                                URLState = link.URLState
                                }) %>'> 
                <ItemTemplate> 
                    <tr class="gradeX odd"> 
                        <td><%# Eval("Id") %></td> <!--property of WebPage (part of results repeater) -->
                        <td><%# Eval("Title") %></td> <!--property of WebPage (part of results repeater) -->
                        <td><%# Eval("Url") %></td> <!--property of WebPage (part of results repeater) -->
                        <td><%# Eval("URL") %></td><!--Property of Link -->
                        <td><%# Eval("URLType") %></td> <!--Property of Link--> 
                        <td><%# Eval("URLState") %></td> <!--Property of Link -->
                    </tr> 
                </ItemTemplate> 
                </asp:Repeater> 
            <%--<ul>
                <li><%# Eval("Id") %></li> <!--property of WebPage (part of results repeater) -->
                <li><%# Eval("Title") %></li> <!--property of WebPage (part of results repeater) -->
                </ul>--%>
        </Itemtemplate> 
    </asp:Repeater>
    </div>
    </form>
</body>
</html>
